﻿using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Application.DTO.Dictionary
{
    /// <summary>
    /// 字典项集合，用来批量添加用户的字典项信息
    /// </summary>
    public class DictionaryValuesDTO
    {
        /// <summary>
        /// 字典项的值
        /// </summary>
        public int? Id { get; set; }
        /// <summary>
        /// 字典键ID
        /// </summary>
        [Required(ErrorMessage ="请填写该字典的键")]
        public int DicKeyId { get; set; }
        /// <summary>
        /// 字典项文本
        /// </summary>
        public string DicText { get; set; }
        /// <summary>
        /// 字典项值
        /// </summary>
        public string DicValue { get; set; }
        /// <summary>
        /// 字典项的父级值信息，用户存单一表的层级信息，一般不建议使用
        /// </summary>
        public string? DicParentValue { get; set; }
        /// <summary>
        /// 排序号
        /// </summary>
        public int OrderSort { get; set; } = 100;
        /// <summary>
        /// 字典项备注
        /// </summary>
        public string Remark { get; set; }
        /// <summary>
        /// 是否启用，0启用，1禁用
        /// </summary>
        public int IsEnable { get; set; } = 0;
    }
}
